Add chain syncing via compact block filters (BIP 157)#828
Draft
febyeji wants to merge 2 commits intolightningdevkit:mainfrom
Draft
Add chain syncing via compact block filters (BIP 157)#828febyeji wants to merge 2 commits intolightningdevkit:mainfrom
febyeji wants to merge 2 commits intolightningdevkit:mainfrom
Conversation
|
👋 Hi! This PR is now in draft status. |
6e39d0d to
86e88ce
Compare
86e88ce to
3de4777
Compare
3de4777 to
9692ff4
Compare
|
🔔 1st Reminder Hey @tnull! This PR has been waiting for your review. |
40a773c to
36b836a
Compare
36b836a to
33b88f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add chain syncing via compact block filters (BIP 157/158) using the
bip157crate. Closes #767.Introduces
CbfChainSource: a new chain backend that syncs wallet and Lightning state through compact block filters over the Bitcoin P2P network.Commits
1. Add BIP 157 compact block filter chain source
Core implementation, built up layer by layer:
bip157dependency andCbfSyncConfigconfigurationCbfChainSourcelifecycle (start/stop) with P2P broadcastConfirmtrait integrationCbfSyncConfig,set_chain_source_cbf)TestChainSource::Cbf,wait_for_cbf_sync)2. Add CBF integration tests and documentation
--test-threads=1(exclusive bitcoind P2P port)LDK_TEST_CHAIN_SOURCEenv var for test configurabilityDesign decisions
bip157crate #767 discussion). Uses block-level averages, which can underestimate during high congestion. (Percentile selection partially mitigates this?)sync_wallets()) + optional background sync viaBackgroundSyncConfig--test-threads=1(exclusive bitcoind P2P port access)